/**
 * Interface for the Physical Layer.
 *
 * @author Timothy Flynn (trflynn@wpi.edu)
 * @version April 10, 2012
 */
#ifndef _PHYSICAL_LAYER_H_
#define _PHYSICAL_LAYER_H_

#include <queue>
#include <pthread.h>
using std::queue;

#include "common.h"
#include "Frame.h"

extern queue<Frame *> sendFrameQ, recvFrameQ;
extern pthread_mutex_t sendFrameM, recvFrameM;

class PhysicalLayer {
public:
	PhysicalLayer();
	PhysicalLayer(const char *);
	virtual ~PhysicalLayer();
	void run();

private:
	int sktID;
	void sendFrame();
	void receiveFrame();
};

#endif
